Ask AI
Skip to main content

Read API from Data-Format

This feature allows you to generate a Read API endpoint based on a selected data format. The Read API is used to retrieve specific data objects by their unique identifiers.

Description

The "Read API from Data-Format" option simplifies the process of creating a secure and functional API for reading data. By selecting a predefined data format, you can quickly generate a Read API that is ready to use or customize further.

Step-by-Step Guide

Follow these steps to create a Read API from a data format:

  1. Go to the "API" Section
    Navigate to the API section in your application or platform.

  2. Choose "Select New API"
    Click on the option labeled "Select New API" to start creating a new API.

  3. Select "Read API from Data-Format"
    From the available options, choose "Read API from Data-Format".

  4. Select the Data Format
    Pick the available data format that you want to use for generating the Read API. This format defines the structure of the data to be retrieved.

  5. Click "Create API"
    Once the data format is selected, click the "Create API" button to generate the Read API.

  6. View and Use the API
    After creation, the generated Read API will be displayed. You can:

    • Test the endpoint.
    • Integrate it into your application.
    • Modify it as needed.

Reading Lists: Filters and Pagination

The “Read a list of Data Format” endpoint (GET) supports pagination and filtering via query parameters. No request body is required.

Pagination

  • Query parameters:
    • PAGE: Page number (integer, 1-based).
    • AMOUNT: Number of items per page (integer).

Examples:

  • HTTP
    GET https://<your-list-endpoint-url>?PAGE=1&AMOUNT=1
  • curl
    curl -X GET "https://<your-list-endpoint-url>?PAGE=1&AMOUNT=1"

Use PAGE and AMOUNT together to control result size and which page to fetch.

Filters

Pass filters as query parameters using the pattern: FILTER.<OPERATOR>.<field>=<value>

You can include multiple filters by adding additional query parameters (one per filter).

Examples shown in the demo:

  • Equality on a text field: FILTER.EQUAL.firstname=John
  • Greater-than on a numeric field: FILTER.GREATER.averageScore=40

Examples:

  • HTTP
    GET https://[your-list-endpoint-url]?FILTER.EQUAL.firstname=John GET https://[your-list-endpoint-url]?FILTER.GREATER.averageScore=40
  • curl curl -X GET "https://[your-list-endpoint-url]?FILTER.EQUAL.firstname=John" curl -X GET "https://[your-list-endpoint-url]?FILTER.GREATER.averageScore=40"

Notes:

  • URL-encode values that contain spaces or special characters.
  • Keep the FILTER.<OPERATOR>.<field> pattern exactly as shown.

Combine Filters with Pagination

You can combine pagination and filters in the same request.

  • HTTP
    GET https://[your-list-endpoint-url]?PAGE=1&AMOUNT=1&FILTER.EQUAL.firstname=John
  • curl
    curl -X GET "https://[your-list-endpoint-url]?PAGE=1&AMOUNT=1&FILTER.EQUAL.firstname=John"

Replace [your-list-endpoint-url]\ with the generated “Read a list of Data Format" endpoint URL (GET).

Key Features

  • Automatic API Generation: Quickly create a Read API without manual coding.
  • Secure and Standardized: The API follows industry best practices for security and design.
  • Customizable: Modify the generated API to suit your specific needs.
  • Time-Saving: Generate a functional Read API in seconds with minimal effort.